package binlog.controller;

import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

;

@RestController
public class SystemController {

	@SneakyThrows
    @GetMapping("/shutdown")
	public void shutdown(@RequestParam int count) {
        TimeUnit.SECONDS.sleep(count);
        System.exit(0);
	}

}
